package java3_21.Scanner;
//潜艇类
public class Submarine extends MoveObject implements Move{
    public Submarine(String name) {
        super(name);
    }

    @Override
    public void swim() {
        System.out.println(this.getName()+"在水里行动！");
    }

    @Override
    public void print() {
        System.out.println("这是一艘"+this.getName());
    }
}
